Release 10.1A: OpenEdge Deployment:
Managing 4GL Applications


Memory-mapped r-code execution environment

At run time, OpenEdge manages the execution of memory-mapped r-code procedures using the following components:

OpenEdge uses the segment descriptor table and the r-code directory to manage r-code procedures from operating system files, standard libraries, and memory-mapped libraries.

Figure B–3 shows the layout for the memory-mapped r-code execution environment.

Figure B–3: Memory-mapped r-code execution environment

In Figure B–3, OpenEdge located the cust.r and orders.r files in a memory-mapped library. Note that all r-code segments in a memory-mapped library are located in shared memory. When OpenEdge needs a segment, it executes the segment directly from shared memory.

Memory-mapped execution sequence

When you run a memory-mapped r-code procedure for the first time, OpenEdge loads and executes the procedure as follows:

  1. Opens the procedure library, if not already open, and memory-maps the library in shared memory.
  2. Reads the r-code procedure and creates an r-code directory entry for the procedure.
  3. Registers each required r-code segment in the execution environment as follows:
    1. Adds an r-code segment entry to the segment descriptor table that references the segment in shared memory.
    2. Inserts a segment descriptor reference in the r-code directory entry for the procedure.
  4. Once the required r-code segments in the procedure are registered in the execution environment, the interpreter begins executing the r-code procedure at the start of the first main action code segment and accesses the remaining segments directly from shared memory as required.
Memory-mapped execution environment limits

The number of memory-mapped r-code procedures that you can run at one time and the shared memory used are determined by the following factors:

Memory-mapped r-code segment management

When OpenEdge needs a memory-mapped r-code segment, it executes the segment directly from shared memory. OpenEdge does not store active memory-mapped r-code segments in the execution buffer. Nor does it swap non-active segments to the session sort file. OpenEdge relies on the operating system to manage the swapping of r-code segments in and out of shared memory.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095